package org.jugile.web2;

public class HttpError extends RuntimeException {
	private static final long serialVersionUID = 10129L;
	private String status;
	
	private HttpError(String status, String message) {
		super(message);
		this.status = status;
	}
	
	public String getStatus() { return status; }	

	public static void status404(String msg) {
		throw new HttpError(Cycle.HTTP_NOTFOUND, msg);		
	}
	public static void status500(String msg) {
		throw new HttpError(Cycle.HTTP_INTERNALERROR, msg);		
	}
	
}
